]> permondes.de Git - Analog_Engine.git/blame - scripts/EP1 04.02 Starting a Rocket_a.LACE
Throwing a stone on earth, starting a rocket from earth
[Analog_Engine.git] / scripts / EP1 04.02 Starting a Rocket_a.LACE
CommitLineData
68fb174e
P
1# A rocket is started from the surface of the earth. Calculating the height as function of its mass and fuel consumption.
2# Approximation of gravity of earth by g
3# Equation of motion
4# r'' = alpha / (m0 - alpha*t) * v0 - g
5# alpha: fuel consumption, e.g. 2000t in 2,5 min = 13,333*10^3 kg/s
6# m0: initial mass of rocket, e.g. Saturn V: 2900 t = 2,9*10^6 kg
7# v0: the velocity of the exhaust of the rocket: 3,180*10^3 m/s
8# g: acceleration of earth = 9,81 m/s^2
9
10include CompoundFunctions.LACE # include idivide
11
12coefficient.1 -> alpha1
13coefficient.2(+1) -> alpha2 # == alpha1
14coefficient.3(-1) -> -m0
15coefficient.4 -> v0
16coefficient.5(+1) -> g
17
18# generate t-ramp
19iintegrate (-1) -> t
20
21cmultiply (alpha1, t) -> alpha*t
22isum (-m0, alpha*t) -> m0-alpha*t
23idivide (alpha2, m0-alpha*t) -> -alpha/(m0-alpha*t)
24cmultiply (-alpha/(m0-alpha*t), v0) -> -alpha/(m0-alpha*t)*v0
25isum(-alpha/(m0-alpha*t)*v0, g) -> alpha/(m0-alpha*t)*v0-g
26
27iintegrate (alpha/(m0-alpha*t)*v0-g) -> -v
28invert (-v) -> v
29iintegrate (-v) -> z
30
31output (t) -> out.x
32output (v) -> out.y
33output (z) -> out.z